$myIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$wp = New-Object Security.Principal.WindowsPrincipal($myIdentity)
$isadmin = $true
if (-not $wp.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) {
	$isadmin = $false;
}

function prompt {
	
	$p = Get-Location
	$user = gc env:userName
	$computer = gc env:computername
	
  	$promptString = "$user@$computer $p>`n$ "
	if($isadmin -eq $true){
		Write-Host $promptString -NoNewline -ForegroundColor DarkGreen
	} else {
		Write-Host $promptString -NoNewline -ForegroundColor Yellow
	}

	return " "
}